$OpenBSD: patch-setup_py,v 1.9 2012/05/25 12:13:01 jasper Exp $
--- setup.py.orig	Fri May 25 09:13:48 2012
+++ setup.py	Fri May 25 09:14:53 2012
@@ -132,15 +132,14 @@ class PCTBuildExt (build_ext):
                 # the libtomcrypt code.
                 self.__add_compiler_option("-O")
             else:
-                # Speed up execution by tweaking compiler options.  This
-                # especially helps the DES modules.
-                self.__add_compiler_option("-O3")
-                self.__add_compiler_option("-fomit-frame-pointer")
                 # Don't include debug symbols unless debugging
                 self.__remove_compiler_option("-g")
                 # Don't include profiling information (incompatible with
                 # -fomit-frame-pointer)
                 self.__remove_compiler_option("-pg")
+                # Honor CFLAGS
+                for opt in os.getenv('CFLAGS').split():
+                    self.__add_compiler_option(opt)
             if USE_GCOV:
                 self.__add_compiler_option("-fprofile-arcs")
                 self.__add_compiler_option("-ftest-coverage")
@@ -375,9 +374,6 @@ kw = {'name':"pycrypto",
                       sources=["src/_fastmath.c"]),
 
             # Hash functions
-            Extension("Crypto.Hash._MD2",
-                      include_dirs=['src/'],
-                      sources=["src/MD2.c"]),
             Extension("Crypto.Hash._MD4",
                       include_dirs=['src/'],
                       sources=["src/MD4.c"]),
@@ -402,9 +398,10 @@ kw = {'name':"pycrypto",
             Extension("Crypto.Cipher._AES",
                       include_dirs=['src/'],
                       sources=["src/AES.c"]),
-            Extension("Crypto.Cipher._ARC2",
-                      include_dirs=['src/'],
-                      sources=["src/ARC2.c"]),
+# Patented
+#            Extension("Crypto.Cipher._ARC2",
+#                      include_dirs=['src/'],
+#                      sources=["src/ARC2.c"]),
             Extension("Crypto.Cipher._Blowfish",
                       include_dirs=['src/'],
                       sources=["src/Blowfish.c"]),
